package top.revery.api.entity.payWallet;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * @author denghao
 * @title  钱包明细
 * @package
 * @date 2019/12/16 14:15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//@MappedSuperclass
@Entity
@Table(name = "log_user")
public class BaseLogUser implements Serializable {
    //id
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    protected Long id;
    @Column(columnDefinition = "bigint(16) not null comment '用户'")
    protected Long userId;
    @Column(columnDefinition = "tinyint(1) NULL comment '状态 0充值,1提现,2奖励,3冻结4解冻'")
    protected Integer type;

    @Column(columnDefinition = "int(11) not null comment '用户角色类型'")
    protected int userType ;

    @Column(columnDefinition = "varchar(11) null comment 'payID'")
    protected String payID;

    @Column(columnDefinition = "decimal(10,2) null comment '金额'")
    private BigDecimal money;
    @Column(columnDefinition = "varchar(11) null comment '备用'")
    protected String equ;


    /*
     * 创建时间
     * 自动值添加值，不能修改
     * */
    @Column(columnDefinition="TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP comment '创建时间'",insertable = false)
    protected Timestamp addTime;
}
